package com.kid.springcloud.service;


import com.kid.springcloud.entity.Member;
import com.kid.springcloud.entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(value = "MEMBER-SERVICE-PROVIDER")
public interface MemberFeignService {


    /**
     *
     * 远程调用的方法为get
     * 调用的url为 http://MEMBER-SERVICE-PROVIDER/member/consumer/get/{id}
     */
    //定义方法，就是远程调用的接口
    @GetMapping("/member/get/{id}")
    public Result getById(@PathVariable("id") Long id);
}
